#define _CRT_SECURE_NO_WARNINGS
#include<string.h>
#include<stdio.h>
#include<assert.h>
char* my_strncat(char* des, const char* src, size_t num)
{
	assert(des && src);
	char* ret = des;
	while (*des!= 0)
	{
		des++;
	}
	while( num && (*des++=*src++) )
	{
		num--;
	}
	if (num == 0)
	{
		*des++ = 0;
	}
	return ret;
}
int main()
{
	char arr1[15] = "abcd";
	char arr2[] = "efg";
	printf("%s", my_strncat(arr1,arr2,2));
	return 0;
}